import 'package:aio/aio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:app/generated/app_strings.dart';
import 'package:app/src/http/bean/wroks/contract_bean.dart';
import 'package:app/src/http/bean/wroks/customers_copyInfo.dart';
import 'package:app/src/ui/app_ui.dart';
import 'package:app/src/ui/route/works/public/items/ui_base.dart';
import 'package:app/src/ui/route/works/public/items/ui_card.dart';
import 'package:app/src/utils/image_path_utils.dart';

///加班审核：人员信息
class UiWorkReviewInfo {
  ///data 客户信息
  ///oldData 历史客户信息
  static Widget build(
      BuildContext context, ContractCopyInfo? data, ContractCopyInfo? oldData) {
    if (StringUtils.isEmpty(data)) {
      return AppUi.getEmptyView();
    }
    List<Widget> children = [];
    children.add(UiBase.title(
        context, AppStrings.of(context).PersonnelInformation)); //标题：人员信息
    children.add(UiBase.item(
        context,
        AppStrings.of(context).TheName,
        data?.TheName,
        oldData?.TheName)); //姓名
    children.add(UiBase.item(context, AppStrings.of(context).Gender,
        data?.Gender, oldData?.Gender)); //性别
    children.add(UiBase.item(
        context,
        AppStrings.of(context).Tel,
        data?.Telephone,
        oldData?.Telephone)); //电话
    children.add(UiBase.item(context, AppStrings.of(context).MobilePhone2,
        data?.MobilePhone, oldData?.MobilePhone)); //手机
    children.add(UiBase.item(context, AppStrings.of(context).EmployeesNature,
        data?.EmployeesNature, oldData?.EmployeesNature)); //员工性质
    children.add(UiBase.item(context, AppStrings.of(context).EmployeesState,
        data?.EmployeesState, oldData?.EmployeesState)); //员工状态
    children.add(UiBase.item(context, AppStrings.of(context).CouldOvertime,
        data?.CouldOvertime, oldData?.CouldOvertime)); //可否加班
    var column = UiBase.column(context, children);
    var card = UiCard.build(context, column);
    return card;
  }
}
